package com.xhsj.user.hr.system.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xhsj.user.hr.system.entity.TbGlobalUserRole;
import com.xhsj.user.hr.system.mapper.TbGlobalUserRoleMapper;
import com.xhsj.user.hr.system.service.TbGlobalUserRoleService;
import com.xhsj.user.hr.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Collection;
import java.util.Map;
import java.util.Objects;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.io.Serializable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import lombok.extern.slf4j.Slf4j;
/**
 * <p>
 * 用户和角色关联表 服务实现类
 * </p>
 *
 * @author liuqinghua
 * @since Sep 8, 2020 9:38:14 AM
 */
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
//@CacheConfig(cacheNames = "TbGlobalUserRole")
public class TbGlobalUserRoleService extends ServiceImpl<TbGlobalUserRoleMapper, TbGlobalUserRole> {
    @Autowired
    private TbGlobalUserRoleMapper dao;

	/**
	 * 保存
	 * @author liuqinghua
	 * @date Sep 8, 2020 9:38:14 AM
	 */
    @Override
    //@CacheEvict(cacheNames="TbGlobalUserRole", allEntries=true)
    public boolean save(TbGlobalUserRole entity) {
        return super.save(entity);
    }

	/**
	 * 通过id获取数据
	 * @author liuqinghua
	 * @date Sep 8, 2020 9:38:14 AM
	 */
    @Override
    //@Cacheable(key = "#id",sync = true)
    public TbGlobalUserRole getById(Serializable id) {
        return super.getById(id);
    }

	/**
	 * 通过id删除数据
	 * @author liuqinghua
	 * @date Sep 8, 2020 9:38:14 AM
	 */
    @Override
    //@CacheEvict(cacheNames="TbGlobalUserRole", allEntries=true)
    public boolean removeById(Serializable id) {
        return super.removeById(id);
    }

	/**
	 * 批量删除数据
	 * @author liuqinghua
	 * @date Sep 8, 2020 9:38:14 AM
	 */
    //@CacheEvict(cacheNames="SysDict", allEntries=true)
    @Override
    public boolean removeByIds(Collection<? extends Serializable> idList) {
        return super.removeByIds(idList);
    }



}
